#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <string.h>
 int main() {

    char ch1[100] = { 0 };
    char ch2[100] = { 0 };
    char ch3[100] = { 0 };
    fgets(ch1, 100, stdin);
    getchar();
    fgets(ch2, 100, stdin);
    int n1 = strlen(ch1);
    int n2 = strlen(ch2);
    int count = 0;

    for (int i = 0; i < n1; i++)
    {
        int flow = 1;
        for (int j = 0; j < n2; j++)
        {
            if (ch1[i] == ch2[j])
            {
                flow = 0;
            }
        }
        if (flow == 1)
        {
            ch3[count++] = ch1[i];
        }
    }
    printf(ch3);
    return 0;
}
